<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
    <title>二维码生成API接口</title>
    <meta name="keywords" content="支持电话 文字 链接的QRAPI" />
    <meta name="description" content="支持电话 文字 链接的QRAPI" />
    <meta property="og:description" content="支持电话 文字 链接的QRAPI" />
    <meta property="og:site_name" content="二维码生成API接口" />
    <meta property="og:title" content="二维码生成API接口" />
    <meta property="og:url" content="https://api.vvhan.com/" />
    <meta itemprop="image" content="/images/logo.webp" />
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="/css/main.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/ashes.min.css" />
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            background-color: #f5f5f5;
        }
        .container {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-width: 600px;
            width: 100%;
            text-align: center;
        }
        .container h1 {
            margin-bottom: 20px;
        }
        .input-group {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .input-group label {
            margin-bottom: 10px;
        }
        .input-group input {
            padding: 10px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 5px;
            width: 100%;
            max-width: 500px;
        }
        .input-group button {
            margin-top: 20px;
            padding: 10px 20px;
            font-size: 16px;
            color: white;
            background-color: #007bff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        .input-group button:hover {
            background-color: #0056b3;
        }
        .qr-code {
            margin-top: 20px;
        }
        @media (max-width: 600px) {
            .input-group input {
                width: 90%;
            }
        }
    </style>
</head>
<body>
<div class="container">
    <h1>二维码生成API接口</h1>
    <div class="input-group">
        <label for="qr-input">请输入内容：</label>
        <input type="text" id="qr-input" placeholder="输入需要生成二维码的内容" />
        <button onclick="generateQRCode()">生成二维码</button>
    </div>
    <div class="qr-code" id="qr-code"></div>
</div>
<script>
    function generateQRCode() {
        const text = document.getElementById('qr-input').value;
        if (!text) {
            alert('请输入内容');
            return;
        }
        const qrCodeDiv = document.getElementById('qr-code');
        qrCodeDiv.innerHTML = '';
        const img = document.createElement('img');
        img.src = `https://api.vvhan.com/api/qr?text=${encodeURIComponent(text)}`;
        img.alt = '生成的二维码';
        qrCodeDiv.appendChild(img);
    }
</script>
</body>
</html>
